//更新进度条主题
const handler = (color: string) => {
  document.getElementById('nprogress-theme')?.remove()
  const style = document.createElement('style')
  style.id = 'nprogress-theme'
  style.innerHTML = `body {--nprogress-theme: ${color};}`
  document.head.appendChild(style)
}

export default handler
